﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DockerPlay;
using Sustainalytics.MongoDB.Extensions;
using Xunit;
using ConnectionStrings = DockerPlay.ConnectionStrings;

namespace Tests
{
    public class MongoSyncWriteTests
    {
        [Fact]
        public async Task CreateMongoStatus()
        {
            var mongoWriteCollection = MongoFactory.GetCollectionFromDatabase<ContainerStatus>(ConnectionStrings.ClientPlatform);
            await mongoWriteCollection.InsertOneAsync(new ContainerStatus()
            {
                Id = Guid.NewGuid(),
                Name = ContainerName.ga_mongo_a_27017,
                Date = DateTime.Now,
                State = DockerContainerState.running,
                ContainerId = "XXXXX-XXXX"
            });
        }
        
    }
}
